<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="Content-Script-Type" content="text/javascript" />
		<meta http-equiv="Content-Style-Type" content="text/css" />
		<title>コントロールパネル</title>

		<link rel="stylesheet" href="./assets/styles/default.css" type="text/css" />
		<script src="assets/scripts/jquery-1.3.2.min.js" type="text/javascript"></script>
		<script src="assets/scripts/menu.js" type="text/javascript"></script>
		<script src="assets/scripts/table.js" type="text/javascript"></script>

		<link type="text/css" href="./assets/styles/ui-lightness/jquery-ui-1.7.2.custom.css" rel="stylesheet" />
		<script type="text/javascript" src="./assets/scripts/ui/ui.core.js"></script>
		
		<script type="text/javascript">
		$(function() {
			// メッセージのフェード
			$('.message').fadeIn("slow");
		});
		function preview( id ){
			var url = '../press-release/detail/' + id + '/';
			window.open(url, 'preview');
		}

		</script>
		
		<link rel="stylesheet" type="text/css" href="./assets/styles/tablesorter.css" />
		<script type="text/javascript" src="./assets/scripts/tablesorter.js"></script>

	</head>
	<body id="">
{{ php }} include( MENU_FILE ); {{ /php }}

		<div id="header" class="clearfix"><div class="wrapper">
			<h1><a href="./">コントロールパネル</a></h1>
			<form id="form_logout" action="logout.php" method="post"><p>{{ $login.staff_name }} <input type="submit" id="button_logout" value="ログアウト" /></p></form>
		</div></div>
		<div id="container"><div class="wrapper">

			<h2>サイト管理</h2>
			<ul class="submenu clearfix">
				<li><span>一覧</span></li>
				<li><a href="press_form.php">プレスリリース登録</a></li>
				<li><a href="news_form.php">ニュース登録</a></li>
			</ul>


			<h3>一覧</h3>
			<p class="message">{{ $cnt }}件登録されています。</p>
			
			<table id="inquiry_result" class="sortable">
				<thead>
					<tr>
						<th><h3>ID</h3></th>
						<th><h3>ステータス</h3></th>
						<th><h3>種別</h3></th>
						<th class="nosort"><h3>タイトル</h3></th>
						<th><h3>日付</h3></th>
						<th><h3>登録日／更新日</h3></th>
						<th><h3>プレビュー</h3></th>
						<th class="nosort"><h3>更新</h3></th>
					</tr>

				</thead>
				<tbody>
{{ foreach from=$newslist key=k item=v }}
					<tr>
{{ if $v.news_type == '1' }}
						<td><a href="press_form.php?id={{ $v.news_id }}">{{ $v.news_id }}</a></td>
{{ else }}
						<td><a href="news_form.php?id={{ $v.news_id }}">{{ $v.news_id }}</a></td>
{{ /if }}
						<td>{{ $select_status[$v.status] }}</td>
						<td>{{ $news_type[$v.news_type] }}</td>
						<td>{{ $v.news_title }}</td>
						<td>{{ $v.news_date }}</td>
						<td>{{ $v.r_date }}<br />{{ $v.u_date }}</td>
						<td><a href="../press-release/detail/{{ $v.news_id }}/" target="_blank">[プレビュー]</a></td>
{{ if $v.news_type == '1' }}
						<td><a href="press_form.php?id={{ $v.news_id }}">[更新]</a></td>
{{ else }}
						<td><a href="news_form.php?id={{ $v.news_id }}">[更新]</a></td>
{{ /if }}
					</tr>
{{ /foreach }}
				</tbody>
			</table>

		</div></div>
		<address>Copyright (C) SHIFT Inc. / All rightes reserved</address>

	</body>
</html>